DX11 BUILD LOOKAT RHMATRIX

Builds a right-handed view matrix from a eye position, a point to look at and an up vector.

  Syntax
Return Dword = DX11 BUILD LOOKAT RHMATRIX(eyePos, lookAtPos, upVector, [resultMatrix])
  Parameters
eyePos
Dword
A vector3 that contains the eye position ("position of the camera").
lookAtPos
Dword
A vector3 that contains the look-at position of the view matrix to be created (the focal point).
upVector
Dword
A vector3 that describes the up vector of the matrix to be created. With default settings, the up vector is (0, 1, 0), that is the up direction is along the positive Y axis.
[Optional] resultMatrix
Dword
The matrix to write the created view matrix to. Can be omitted, in which case a temporary matrix holding the generated view matrix will be returned.

  Returns

The resultMatrix, if one was provided, or a newly created temporary matrix holding the resulting matrix otherwise.

  See also

MATH Functions Menu
DX11 Function Categories